import { $t } from '@/plugins/i18n'

export default {
  path: '/permission',
  name: 'Permission',
  level: 1,
  meta: {
    title: $t('route.permission'),
    icon: 'icon-permission',
    rank: 2
  },
  redirect: '/permission/button',
  children: [
    {
      path: '/permission/button',
      name: 'PermissionButton',
      component: () => import('@/views/permisson/button/index.vue'),
      meta: {
        title: $t('route.permissionButton'),
        navTip: $t('route.permissionButtonTip'),
        menu: true
      }
    },
    {
      path: '/permission/page',
      name: 'PermissionPage',
      component: () => import('@/views/permisson/page/index.vue'),
      meta: {
        title: $t('route.permissionPage'),
        menu: true,
        navTip: $t('route.permissionButtonTip')
      },
      children: [
        {
          path: '/permission/page/one',
          name: 'PermissionPageOne',
          component: () =>
            import('@/views/permisson/page/pages.tsx').then(
              module => module.PageOne
            ),
          meta: {
            title: $t('route.permissionPage'),
            activePath: '/permission/page'
          }
        },
        {
          path: '/permission/page/two',
          name: 'PermissionPageTwo',
          component: () =>
            import('@/views/permisson/page/pages.tsx').then(
              module => module.PageTwo
            ),
          meta: {
            title: $t('route.permissionPage'),
            activePath: '/permission/page'
          }
        }
      ]
    }
  ]
} as RouteConfigsTable
